import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from "./store"
import TreeTable from 'vue-table-with-tree-grid'

// import Antd from 'ant-design-vue';//引入ant UI库
import "./plugins/antd"
import 'ant-design-vue/dist/antd.css';
import { message } from "ant-design-vue"
// 引入vxeTable组件
import 'xe-utils'
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'

// 中英文切换
import VueI18n from 'vue-i18n'
Vue.use(VueI18n) // 挂载

const i18n = new VueI18n({
  locale: 'zh-CN',    // 语言标识
  messages: {
    'zh-CN': require('./lang/zh'),   // 通过require引入中文语言包
    'en-US': require('./lang/en')    // 通过require引入英文语言包
  }
})

// 引入moment.js
import moment from 'moment'//导入文件
Vue.prototype.$moment = moment;//赋值使用

// 引入日历组件
import fullCalendar from 'vue-fullcalendar'
Vue.component('full-calendar', fullCalendar)

Vue.config.productionTip = false
Vue.use(VXETable)
// Vue.use(Antd)
Vue.component('tree-table', TreeTable)
Vue.prototype.$message = message
message.config({
  duration: 2,
  top: '100px',
  maxCount: 3
})

let vue = new Vue({
  router,
  store,
  i18n,
  render: function (h) { return h(App) }
}).$mount('#app')

export default vue